﻿
namespace ADministration.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies CategoryMetadata as the class
    // that carries additional metadata for the Category class.
    [MetadataTypeAttribute(typeof(Category.CategoryMetadata))]
    public partial class Category
    {

        // This class allows you to attach custom attributes to properties
        // of the Category class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CategoryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CategoryMetadata()
            {
            }

            public int CategoryID { get; set; }

            [Include]
            public EntityCollection<Event> Events { get; set; }

            public string Name { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies EventMetadata as the class
    // that carries additional metadata for the Event class.
    [MetadataTypeAttribute(typeof(Event.EventMetadata))]
    public partial class Event
    {

        // This class allows you to attach custom attributes to properties
        // of the Event class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class EventMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private EventMetadata()
            {
            }

            [Include]
            public Category Category { get; set; }

            public int CategoryID { get; set; }

            public string Currency { get; set; }

            public int EventID { get; set; }

            public string Location { get; set; }

            public decimal Price { get; set; }

            public EntityCollection<Purchase> Purchases { get; set; }

            public string Title { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies PurchaseMetadata as the class
    // that carries additional metadata for the Purchase class.
    [MetadataTypeAttribute(typeof(Purchase.PurchaseMetadata))]
    public partial class Purchase
    {

        // This class allows you to attach custom attributes to properties
        // of the Purchase class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class PurchaseMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private PurchaseMetadata()
            {
            }

            public string CustomerName { get; set; }

            public Event Event { get; set; }

            public int EventID { get; set; }

            public int PurchaseID { get; set; }

            public bool Status { get; set; }

            public int TicketsNumber { get; set; }
        }
    }
}
